// const {url} = require('./all')

module.exports = {
  pageUrl(url,method="GET",data={}){
    wx.showLoading({
      title: '拼命加载中.....',
    })
    url = `https://api.it120.cc/twy/${url}`
    return new Promise((resolve,reject)=>{
        wx.request({
          url,
          method,
          data,
          header:{
            "Content-type":"application/x-www-form-urlencoded"
          },
          success:(res)=>{
          wx.hideLoading({
            success: (res) => {},
          })
           resolve(res)
          }
        })
    })
  }
}